// 验证登录后登录框样式变换


/*=============搜素框固定事件=============*/
    $(function(){
    //window对象触发滚动事件
    $(window).scroll(function(){

        if($(document).scrollTop() >= $(".factor").height()){
            // console.log("超过了");
            $("#header").css({"position":"fixed","top":0});
            $(".serch_body").css({"position":"fixed","top":49});
            $(".serch_body").css({"box-shadow":"0 16px 40px 0 rgb(255 255 255 / 100%)","background":"white","border-bottom":"1px solid ghostwhite "});
            // $(".search_box_select").css("marginTop",$(".factor").height());
        }else{
            $("#header").css("position","static");
            $(".serch_body").css("position","static");
            $(".serch_body").css({"box-shadow":"none"});
            $(".serch_body").css({"border-bottom":"none"});
            $(".serch_body").css({"background-color":"rgba(255,255,255,.1"});
            // $(".search_box_select").css("marginTop",0);
        }
    });
});

/*==========热门职业分类=========*/
var job1 = document.querySelector(".cur1");
var job2 = document.querySelector(".cur21");
var job3 = document.querySelector(".cur31");
var job4 = document.querySelector(".cur41");
var job5 = document.querySelector(".cur51");
var job6 = document.querySelector(".cur61");
var job7 = document.querySelector(".cur71");


job1.addEventListener("click",function () {
    job1.className = "cur1";
    job2.className = "cur21";
    job3.className = "cur31";
    job4.className = "cur41";
    job5.className = "cur51";
    job6.className = "cur61";
    job7.className = "cur71";
});


document.querySelector(".cur1").onclick = function () {
    var job11 = document.querySelector(".sub_li_centent");
    job11.style.display = "block";
    var job22 = document.querySelector(".sub_li_centent1");
    job22.style.display = "none";
    var job33 = document.querySelector(".sub_li_centent2");
    job33.style.display = "none";
    var job44 = document.querySelector(".sub_li_centent3");
    job44.style.display = "none";
    var job55 = document.querySelector(".sub_li_centent4");
    job55.style.display = "none";
    var job66 = document.querySelector(".sub_li_centent5");
    job66.style.display = "none";
    var job77 = document.querySelector(".sub_li_centent6");
    job77.style.display = "none";

};
document.querySelector(".cur21").onclick = function () {
    var job11 = document.querySelector(".sub_li_centent");
    job11.style.display = "none";
    var job22 = document.querySelector(".sub_li_centent1");
    job22.style.display = "block";
    var job33 = document.querySelector(".sub_li_centent2");
    job33.style.display = "none";
    var job44 = document.querySelector(".sub_li_centent3");
    job44.style.display = "none";
    var job55 = document.querySelector(".sub_li_centent4");
    job55.style.display = "none";
    var job66 = document.querySelector(".sub_li_centent5");
    job66.style.display = "none";
    var job77 = document.querySelector(".sub_li_centent6");
    job77.style.display = "none";

};
document.querySelector(".cur31").onclick = function () {
    var job11 = document.querySelector(".sub_li_centent");
    job11.style.display = "none";
    var job22 = document.querySelector(".sub_li_centent1");
    job22.style.display = "none";
    var job33 = document.querySelector(".sub_li_centent2");
    job33.style.display = "block";
    var job44 = document.querySelector(".sub_li_centent3");
    job44.style.display = "none";
    var job55 = document.querySelector(".sub_li_centent4");
    job55.style.display = "none";
    var job66 = document.querySelector(".sub_li_centent5");
    job66.style.display = "none";
    var job77 = document.querySelector(".sub_li_centent6");
    job77.style.display = "none";

};

document.querySelector(".cur41").onclick = function () {
    var job11 = document.querySelector(".sub_li_centent");
    job11.style.display = "none";
    var job22 = document.querySelector(".sub_li_centent1");
    job22.style.display = "none";
    var job33 = document.querySelector(".sub_li_centent2");
    job33.style.display = "none";
    var job44 = document.querySelector(".sub_li_centent3");
    job44.style.display = "block";
    var job55 = document.querySelector(".sub_li_centent4");
    job55.style.display = "none";
    var job66 = document.querySelector(".sub_li_centent5");
    job66.style.display = "none";
    var job77 = document.querySelector(".sub_li_centent6");
    job77.style.display = "none";

};

document.querySelector(".cur51").onclick = function () {
    var job11 = document.querySelector(".sub_li_centent");
    job11.style.display = "none";
    var job22 = document.querySelector(".sub_li_centent1");
    job22.style.display = "none";
    var job33 = document.querySelector(".sub_li_centent2");
    job33.style.display = "none";
    var job44 = document.querySelector(".sub_li_centent3");
    job44.style.display = "none";
    var job55 = document.querySelector(".sub_li_centent4");
    job55.style.display = "block";
    var job66 = document.querySelector(".sub_li_centent5");
    job66.style.display = "none";
    var job77 = document.querySelector(".sub_li_centent6");
    job77.style.display = "none";

};

document.querySelector(".cur61").onclick = function () {
    var job11 = document.querySelector(".sub_li_centent");
    job11.style.display = "none";
    var job22 = document.querySelector(".sub_li_centent1");
    job22.style.display = "none";
    var job33 = document.querySelector(".sub_li_centent2");
    job33.style.display = "none";
    var job44 = document.querySelector(".sub_li_centent3");
    job44.style.display = "none";
    var job55 = document.querySelector(".sub_li_centent4");
    job55.style.display = "none";
    var job66 = document.querySelector(".sub_li_centent5");
    job66.style.display = "block";
    var job77 = document.querySelector(".sub_li_centent6");
    job77.style.display = "none";

};

document.querySelector(".cur71").onclick = function () {
    var job11 = document.querySelector(".sub_li_centent");
    job11.style.display = "none";
    var job22 = document.querySelector(".sub_li_centent1");
    job22.style.display = "none";
    var job33 = document.querySelector(".sub_li_centent2");
    job33.style.display = "none";
    var job44 = document.querySelector(".sub_li_centent3");
    job44.style.display = "none";
    var job55 = document.querySelector(".sub_li_centent4");
    job55.style.display = "none";
    var job66 = document.querySelector(".sub_li_centent5");
    job66.style.display = "none";
    var job77 = document.querySelector(".sub_li_centent6");
    job77.style.display = "block";

};
job2.addEventListener("click",function (){
    job2.className = "cur2";
    job1.className = "cur11";
    job3.className = "cur31";
    job4.className = "cur41";
    job5.className = "cur51";
    job6.className = "cur61";
    job7.className = "cur71";
});
job3.addEventListener("click",function (){
    job2.className = "cur21";
    job1.className = "cur11";
    job3.className = "cur3";
    job4.className = "cur41";
    job5.className = "cur51";
    job6.className = "cur61";
    job7.className = "cur71";
});
job4.addEventListener("click",function (){
    job2.className = "cur21";
    job1.className = "cur11";
    job3.className = "cur31";
    job4.className = "cur4";
    job5.className = "cur51";
    job6.className = "cur61";
    job7.className = "cur71";
});
job5.addEventListener("click",function (){
    job2.className = "cur21";
    job1.className = "cur11";
    job3.className = "cur31";
    job4.className = "cur41";
    job5.className = "cur5";
    job6.className = "cur61";
    job7.className = "cur71";
});
job6.addEventListener("click",function (){
    job2.className = "cur21";
    job1.className = "cur11";
    job3.className = "cur31";
    job4.className = "cur41";
    job5.className = "cur51";
    job6.className = "cur6";
    job7.className = "cur71";
});
job7.addEventListener("click",function (){
    job2.className = "cur21";
    job1.className = "cur11";
    job3.className = "cur31";
    job4.className = "cur41";
    job5.className = "cur51";
    job6.className = "cur61";
    job7.className = "cur7";
});


/*=======轮播图======*/
/*
$(function () {
    var img = 1190;
    var index = 0;
    var option = $('.uli>li img').length;
    $('.btn_left').click(function (){
        left()
    })
    function left(){
        if (index < option - 1){
            index++
        }else {
            index = 0
        }
        move()
    }
    $('.btn_right').click(function () {
        right()
    })
    function right(){
        if (index > 0){
            index--
        }else {
            index = option - 1
        }
        move()
    }
    function move(){
        var a = -index * img + 'px'
        $('.uli li>img').animate({'left':a},500)
    }
})

*/



